// Copyright 2021-2025 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-es v2.10.1 with parameter "target=ts,import_extension=js,valid_types=protovalidate_required+legacy_required"
// @generated from file extra/minimal-validate.proto (package buf.validate, syntax proto2)
/* eslint-disable */

// This file is a reduced copy of https://github.com/bufbuild/protovalidate/blob/main/proto/protovalidate/buf/validate/validate.proto
// It only contains the definitions necessary to resolve `required` rule, ignores,
// and disabled.

import type { GenEnum, GenExtension, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
import { enumDesc, extDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
import type { FieldOptions, MessageOptions, OneofOptions } from "@bufbuild/protobuf/wkt";
import { file_google_protobuf_descriptor } from "@bufbuild/protobuf/wkt";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file extra/minimal-validate.proto.
 */
export const file_extra_minimal_validate: GenFile = /*@__PURE__*/
  fileDesc("ChxleHRyYS9taW5pbWFsLXZhbGlkYXRlLnByb3RvEgxidWYudmFsaWRhdGUiJAoMTWVzc2FnZVJ1bGVzEhQKCGRpc2FibGVkGAEgASgIQgIYASIeCgpPbmVvZlJ1bGVzEhAKCHJlcXVpcmVkGAEgASgIIqQBCgpGaWVsZFJ1bGVzEhAKCHJlcXVpcmVkGBkgASgIEiQKBmlnbm9yZRgbIAEoDjIULmJ1Zi52YWxpZGF0ZS5JZ25vcmUSLwoIcmVwZWF0ZWQYEiABKAsyGy5idWYudmFsaWRhdGUuUmVwZWF0ZWRSdWxlc0gAEiUKA21hcBgTIAEoCzIWLmJ1Zi52YWxpZGF0ZS5NYXBSdWxlc0gAQgYKBHR5cGUiOAoNUmVwZWF0ZWRSdWxlcxInCgVpdGVtcxgEIAEoCzIYLmJ1Zi52YWxpZGF0ZS5GaWVsZFJ1bGVzIjQKCE1hcFJ1bGVzEigKBnZhbHVlcxgFIAEoCzIYLmJ1Zi52YWxpZGF0ZS5GaWVsZFJ1bGVzKm4KBklnbm9yZRIWChJJR05PUkVfVU5TUEVDSUZJRUQQABIYChRJR05PUkVfSUZfWkVST19WQUxVRRABEh8KF0lHTk9SRV9JRl9ERUZBVUxUX1ZBTFVFEAIaAggBEhEKDUlHTk9SRV9BTFdBWVMQAzpWCgdtZXNzYWdlEh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGIcJIAEoCzIaLmJ1Zi52YWxpZGF0ZS5NZXNzYWdlUnVsZXNSB21lc3NhZ2U6TgoFb25lb2YSHS5nb29nbGUucHJvdG9idWYuT25lb2ZPcHRpb25zGIcJIAEoCzIYLmJ1Zi52YWxpZGF0ZS5PbmVvZlJ1bGVzUgVvbmVvZjpOCgVmaWVsZBIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMYhwkgASgLMhguYnVmLnZhbGlkYXRlLkZpZWxkUnVsZXNSBWZpZWxk", [file_google_protobuf_descriptor]);

/**
 * @generated from message buf.validate.MessageRules
 */
export type MessageRules = Message<"buf.validate.MessageRules"> & {
  /**
   * removed in https://github.com/bufbuild/protovalidate/pull/394
   *
   * @generated from field: optional bool disabled = 1 [deprecated = true];
   * @deprecated
   */
  disabled: boolean;
};

export type MessageRulesValid = MessageRules;

/**
 * Describes the message buf.validate.MessageRules.
 * Use `create(MessageRulesSchema)` to create a new message.
 */
export const MessageRulesSchema: GenMessage<MessageRules, {validType: MessageRulesValid}> = /*@__PURE__*/
  messageDesc(file_extra_minimal_validate, 0);

/**
 * @generated from message buf.validate.OneofRules
 */
export type OneofRules = Message<"buf.validate.OneofRules"> & {
  /**
   * @generated from field: optional bool required = 1;
   */
  required: boolean;
};

export type OneofRulesValid = OneofRules;

/**
 * Describes the message buf.validate.OneofRules.
 * Use `create(OneofRulesSchema)` to create a new message.
 */
export const OneofRulesSchema: GenMessage<OneofRules, {validType: OneofRulesValid}> = /*@__PURE__*/
  messageDesc(file_extra_minimal_validate, 1);

/**
 * @generated from message buf.validate.FieldRules
 */
export type FieldRules = Message<"buf.validate.FieldRules"> & {
  /**
   * @generated from field: optional bool required = 25;
   */
  required: boolean;

  /**
   * @generated from field: optional buf.validate.Ignore ignore = 27;
   */
  ignore: Ignore;

  /**
   * @generated from oneof buf.validate.FieldRules.type
   */
  type: {
    /**
     * @generated from field: buf.validate.RepeatedRules repeated = 18;
     */
    value: RepeatedRules;
    case: "repeated";
  } | {
    /**
     * @generated from field: buf.validate.MapRules map = 19;
     */
    value: MapRules;
    case: "map";
  } | { case: undefined; value?: undefined };
};

export type FieldRulesValid = FieldRules;

/**
 * Describes the message buf.validate.FieldRules.
 * Use `create(FieldRulesSchema)` to create a new message.
 */
export const FieldRulesSchema: GenMessage<FieldRules, {validType: FieldRulesValid}> = /*@__PURE__*/
  messageDesc(file_extra_minimal_validate, 2);

/**
 * @generated from message buf.validate.RepeatedRules
 */
export type RepeatedRules = Message<"buf.validate.RepeatedRules"> & {
  /**
   * @generated from field: optional buf.validate.FieldRules items = 4;
   */
  items?: FieldRules;
};

export type RepeatedRulesValid = RepeatedRules;

/**
 * Describes the message buf.validate.RepeatedRules.
 * Use `create(RepeatedRulesSchema)` to create a new message.
 */
export const RepeatedRulesSchema: GenMessage<RepeatedRules, {validType: RepeatedRulesValid}> = /*@__PURE__*/
  messageDesc(file_extra_minimal_validate, 3);

/**
 * @generated from message buf.validate.MapRules
 */
export type MapRules = Message<"buf.validate.MapRules"> & {
  /**
   * @generated from field: optional buf.validate.FieldRules values = 5;
   */
  values?: FieldRules;
};

export type MapRulesValid = MapRules;

/**
 * Describes the message buf.validate.MapRules.
 * Use `create(MapRulesSchema)` to create a new message.
 */
export const MapRulesSchema: GenMessage<MapRules, {validType: MapRulesValid}> = /*@__PURE__*/
  messageDesc(file_extra_minimal_validate, 4);

/**
 * @generated from enum buf.validate.Ignore
 */
export enum Ignore {
  /**
   * @generated from enum value: IGNORE_UNSPECIFIED = 0;
   */
  UNSPECIFIED = 0,

  /**
   * renamed in https://github.com/bufbuild/protovalidate/pull/397
   *
   * @generated from enum value: IGNORE_IF_ZERO_VALUE = 1;
   */
  IF_ZERO_VALUE = 1,

  /**
   * removed in https://github.com/bufbuild/protovalidate/pull/396
   *
   * @generated from enum value: IGNORE_IF_DEFAULT_VALUE = 2 [deprecated = true];
   * @deprecated
   */
  IF_DEFAULT_VALUE = 2,

  /**
   * @generated from enum value: IGNORE_ALWAYS = 3;
   */
  ALWAYS = 3,
}

/**
 * Describes the enum buf.validate.Ignore.
 */
export const IgnoreSchema: GenEnum<Ignore> = /*@__PURE__*/
  enumDesc(file_extra_minimal_validate, 0);

/**
 * @generated from extension: optional buf.validate.MessageRules message = 1159;
 */
export const message: GenExtension<MessageOptions, MessageRules> = /*@__PURE__*/
  extDesc(file_extra_minimal_validate, 0);

/**
 * @generated from extension: optional buf.validate.OneofRules oneof = 1159;
 */
export const oneof: GenExtension<OneofOptions, OneofRules> = /*@__PURE__*/
  extDesc(file_extra_minimal_validate, 1);

/**
 * @generated from extension: optional buf.validate.FieldRules field = 1159;
 */
export const field: GenExtension<FieldOptions, FieldRules> = /*@__PURE__*/
  extDesc(file_extra_minimal_validate, 2);

